
public class TransportMercaderies extends Transport {

	public static double Extra_Per_Tona=2;
	public double Tones;
	public double preu;
	//Constructor
	public TransportMercaderies(double hores, double Tones, String dni){
		super(hores,dni);
		this.Tones=Tones;
		this.preu=Preu(Tones);
	}
	//Calcula preu
	public double Preu(double Tones){
		double preu=Tones*Extra_Per_Tona+super.Preu();
		return preu;
	}
}
